<template>
  <div class="ft" style="display:flex;flex-wrap:wrap; ju">
    <div class="footerbox" v-for="item in arr" :key="item.id">
      <div class="footer">
        <div class="mess">
          <div class="imgbox">
            <img :src="touxiang" alt />
          </div>
          <div class="message">
            <p style=" margin-top: 20px;">
              <span style="font-size:20px">
                <b>{{item.username}}</b>
              </span>
              <span style="font-size:16px;margin-left:10px;color:#7645f8">vip{{item.type}}</span>
              <span style="font-size:16px;margin-left:10px;color:#b3b3b3">{{typesex[item.sextype]}}</span>
              <span style="font-size:16px;margin-left:10px;color:#b3b3b3">{{item.age}}</span>
              <span
                class="condition"
                style="font-size:14px;margin-left:20px;color:#fff;padding:1px 6px"
                :style="{background:atatetypeColor[item.atatetype]}"
              >{{atatetypeobj[item.atatetype]}}</span>
            </p>
            <p style="font-size:16px;margin-top:20px;color:#b3b3b3">
              创建时间:
              {{item.creatTime}}
            </p>
            <p style="font-size:16px;margin-top:10px;color:#b3b3b3">
              科室:
              <span style="padding-right:30px">全科</span>
              医生:
              <span>{{item.doctorname}}</span>
            </p>
            <p style="font-size:16px;margin-top:10px;color:#b3b3b3">
              手机号码:
              <span style="margin-left:5px">{{item.phone}}</span>
            </p>
          </div>
        </div>
        <div class="base">
          <div style="width:175px;cursor: pointer;">
            <span style="color:blue">接诊</span>
          </div>
          <div style="width:175px;border-left:1px #b3b3b3 solid;cursor: pointer;color:#b3b3b3">
            <span @click="lookmess(item)">查看患者信息</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import eventBus from "../../../utils/evetBus.js";
import touxiang from "../../../assets/images/workimg/touxiang.jpg";
export default {
  props: ["arr"],
  data() {
    return {
      touxiang,
      typesex: {
        1: "男",
        2: "女"
      },
      atatetypeobj: {
        1: "待接诊",
        2: "接诊中",
        3: "已完成"
      },
      atatetypeColor: {
        1: "#ff6262",
        2: "#28d094",
        3: "#cccccc"
      }
    };
  },
  methods: {
    lookmess(item) {
      eventBus.$emit("batchdelete", item);
    }
  }
};
</script>

<style lang="less" scoped>
.footerbox {
  border: 1px #b3b3b3 solid;
  border-radius: 8px;
  width: 350px;
  margin-left: 15px;
  margin-top: 30px;

  .base {
    display: flex;
    text-align: center;
    border-top: 1px #b3b3b3 solid;
    height: 30px;
    line-height: 30px;
  }
  .footer {
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;

    .mess {
      display: flex;

      width: 3500px;
      height: 180px;
      .condition {
        border-radius: 10px;
        font-size: 12px;
      }
      .imgbox {
        width: 80px;
        height: 180px;
        padding-top: 30px;
        padding-left: 30px;

        img {
          width: 60px;
          height: 60px;
          display: block;
          border-radius: 30px;
        }
      }
    }
  }
}
</style>